import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react";

//createApi方法用于创建全局状态切片
//apiReducer 为使用的路径
//通过fetchBaseQuery方法指定当前api的请求基本路径
const apiService = createApi({
    reducerPath: "apiReducer",
    baseQuery: fetchBaseQuery({ baseUrl: process.env.REACT_APP_BASE_URL }),
    endpoints: () => ({}),
});

export default apiService;